<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("modelConfigPath", "group");
%>
<t:panel cssClass="panel-flat border-top-xlg border-top-primary" customBody="true" customHead="true">
<t:form commandName="templateSearch" action="/admin/template/index"  cssClass="form-horizontal" ajaxPost="true" onSuccess="onSuccess">
<div class="row">
	<div class="col-md-6 col-sm-6 col-lg-6 hidden-xs" >
		<div class="col-md-5 col-sm-5">
			<t:label path="templateId" cssClass="col-sm-3 col-md-3" />
			<t:select2 path="templateId" colClass="col-sm-9 col-md-9"  />
		</div>
	</div>
</div>
</t:form>
<c:import url="templateDetailed.jsp" />
</t:panel>
<script type="text/javascript">


$(function(){
	loadData();
	getValue();
	$("#templateId").on("change",function(){
		changeData();
		getValue();
	});
	
})
function loadData(){
	var id = '${tId}';	
	if(id!=""){
		$("#templateId").val(id);
	}
	window.templateId=$("#templateId").val();
	var url = $.getVirtualPath()+"/admin/project/templateDetailed";
	var res = $.getTextPost(url,"templateId="+templateId);
	$("#comments").val(res);
}
function changeData(){
	templateId=$("#templateId").val();
	var url = $.getVirtualPath()+"/admin/project/templateDetailed";
	var res = $.getTextPost(url,"templateId="+templateId);
	$("#comments").val(res);
}

</script>